package com.lanyou.esb.cook.proxy.common;

/**
 * 常量
 * 
 * @author Davey.wu
 */
public final class Constants {

	// 数据类型 START====================================
	/** 整型 **/
	public static final String INTEGER_TYPE = "INT";
	/** 字符串 **/
	public static final String STRING_TYPE = "STRING";
	// 数据类型 END====================================

	// parameter_set name START=========================
	/** 访问令牌每日申请上限配置参数 **/
	public static final String ACCESSTOKEN_DAY_APP_UPPER_LIMIT = "ACCESSTOKEN_DAY_APP_UPPER_LIMIT";
	/** 访问令牌有效期配置参数 **/
	public static final String ACCESSTOKEN_EXPIRES_IN = "ACCESSTOKEN_EXPIRES_IN";
	/** REDIS配置参数 **/
	public static final String REDIS_SERVER = "REDIS_SERVER_COOK_PROXY";
	// parameter_set name END=========================

	// 日期格式 START=======================
	public static final String DATE_PATTERN_YYYYMMDDHHMMSS = "yyyy-MM-dd HH:mm:ss";
	public static final String DATE_PATTERN_YYYYMMDD_NOSPACE = "yyyyMMdd";
	public static final String DATE_PATTERN_YYYYMM_NOSPACE = "yyyyMM";
	public static final String DATE_PATTERN_YYYYMMDDHHMMSS_NOSPACE = "yyyyMMddHHmmss";
	public static final String DATE_PATTERN_YYYYMMDD = "yyyy-MM-dd";
	// 日期格式 END=======================

	// 请求参数名 START================================
	/** 请求头标识符 **/
	public static final String PROXY_HEADER = "EsbHead";
	/** 密钥 **/
	public static final String APPLY_KEY = "ApplyKey";
	/** 接口编码 **/
	public static final String INTERFACE_CODE = "InterfaceCode";
	/** 接口ID **/
	public static final String INTERFACE_ID = "InterfaceId";
	/** 系统编码 **/
	public static final String SYSTEM_CODE = "SystemCode";
	/** 调用方系统编码 **/
	public static final String CALL_SYSTEM_CODE = "CallSystemCode";
	/** 调用方系统ID **/
	public static final String CALL_SYSTEM_ID = "CallSystemId";
	/** 接口版本 **/
	public static final String INTERFACE_VERSION = "InterfaceVersion";
	/** 访问令牌 **/
	public static final String ACCESS_TOKEN = "AccessToken";
	/** 访问令牌 **/
	public static final String STATUS = "Status";
	/** 错误码 **/
	public static final String ERROR_CODE = "ErrCode";
	/** 错误信息 **/
	public static final String ERROR_MSG = "ErrMsg";
	/** 令牌有效期 **/
	public static final String EXPIRES_IN = "ExpiresIn";
	public static final String IP = "ip";
	public static final String APPLY_DATE = "ApplyDate";
	public static final String NULL_VALUE = "null";
	public static final String INVALID_TIMES = "InvalidTimes";
	public static final String EXPIRED_DATE = "ExpiredDate";
	public static final String CURRENT_DATE = "CurrentDate";
	public static final String IS_ENABLE = "IsEnable";
	public static final String ISOLATION = "Isolation";
	public static final String AUDIT_STATUS = "AuditStatus";
	public static final String REQ_MAX = "ReqMax";
	public static final String CUR_REQ_TIMES = "CurrentRequestTimes";
	public static final String STATUS_CODE = "StatusCode";
	public static final String REASON_PHRASE = "ReasonPhrase";
	// 请求参数名 END================================

	// 其它常量 START==========================
	/** 存储转发次数 **/
	public static final int REQ_FORWARD_TRY_TIMES = 3;
	/** 默认访问令牌日最大申请次数 **/
	public static final int ACCESSTOKEN_DAY_APP_UPPER_LIMIT_DEFAULT = 12;
	/** 默认访问令牌有效期 **/
	public static final int ACCESSTOKEN_EXPIRES_IN_DEFAULT = 7200;
	/** 服务告警平均响应时间记录区间 **/
	public static final int ALARM_AVG_RES_TIMES_SECTION = 1;
	/** 默认用户名 **/
	public static final String DEFAULT_USER = "SYSTEM";
	/** 运行环境 **/
	public static final String ENVIRONMENT = "environment";
	/** 请求时间单位 **/
	public static final String REQUEST_UNIT = "RequestUnit";

	/** 接口ID标识 **/
	public static final String IF_ID_KEY = "ifId";
	/** 调用方系统编码标识 **/
	public static final String CALLSYSTEMCODE_KEY = "callSystemCode";
	/** 创建者标识 **/
	public static final String CREATOR_KEY = "creator";
	/** 编码类型 **/
	public static final String ENCODING_TYPE_UTF8 = "UTF-8";
	/** 请求内容类型 **/
	public static final String CONTENT_TYPE_APP_JSON = "Content-Type: application/json;charset=UTF-8";
	/** 工单号前缀 **/
	public static final String WO_SUFFIX = "WO";

	public static final int EACH_READE_FEFAULT_SIZE = 4096;
	public static final int EACH_READE_FEFAULT_SIZE_BIG = 40960;

	// 其它常量 END==========================

	// MSG START=========================
	public static final String MSG_BEGIN_AUTH = "开始校验权限";
	public static final String MSG_ACQUIRE_AUTH_INFO = "获取认证信息";
	public static final String MSG_APPLY_KEY_INVALID_DATE = "密钥失效时间";
	public static final String MSG_CURRENT_TIME = "当前时间";
	public static final String MSG_IF_TYPE = "接口类型";
	public static final String MSG_AUTH_TYPE = "校验类型";
	public static final String MSG_BEGIN_CHECK_WHITE_LIST = "开始白名单校验";
	public static final String MSG_MISS_REQ_HEADER = "找不到请求头";
	public static final String MSG_IS_EMPTY = "为空";
	public static final String MSG_AUTHINFO_FORMAT_ERROR = "认证信息格式不正确";
	public static final String MSG_BEGIN_ACCESSTOKEN_INFO = "开始校验访问令牌信息";
	
	public static final String MSG_REQ_END = "请求结束";
	public static final String MSG_REQ_TIMEOUT = "请求超时";
	public static final String MSG_HTTP_HOST_CONNECTION_EXCEPTION = "连接不到远程主机";
	public static final String MSG_SOCKET_EXCEPTION = "连接夽接字中断，服务异常";
	public static final String MSG_DETIAL_INFO = "详细信息";
	public static final String MSG_BEGIN_REQ_FORWARD = "开始请求转发";
	public static final String MSG_REQ_FORWARD_RESULT = "请求转发结果";
	public static final String MSG_REQ_QUIT = "请求退出";
	public static final String MSG_VERIFY_REQ_QTY = "校验请求量控制";
	public static final String MSG_REQ_FAILURE = "请求失败";
	public static final String MSG_REQ_SUCCESS = "请求成功";

	public static final String FLAG_EQUAL = "=";
	public static final String FLAG_LEFT_SQUARE_BRACKET = "【";
	public static final String FLAG_RIGHT_SQUARE_BRACKET = "】";
	public static final String FLAG_COMMA_SYMBOL = ",";
	public static final String FLAG_DOT_SYMBOL = "。";
	public static final String FLAG_COLON = ":";
	public static final String FLAG_SEMICOLON = ";";
	
	public static final String MSG_ALARM_TYPE = "告警类型";
	public static final String MSG_ALARM_LEVEL = "告警级别";
	public static final String MSG_AUTH_SUCCESS = "认证成功";
	
	public static final String MSG_DETIAL="详细信息：";
	// MSG END=========================
}
